package org.uiot.process

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment

trait StreamJobTraits implements FlinkJobTraits {

    Long checkPointing = 60 * 1000

    StreamExecutionEnvironment getStreamExecutionEnvironment() {
        StreamExecutionEnvironment
                .createRemoteEnvironment(flinkInst.host, flinkInst.port, null)
                .enableCheckpointing(checkPointing)//单位毫秒，意外终止程序会从最近一个检查点回滚数据和状态
    }

    abstract void submit(String operator)
}